docs: replace the typedoc site with VitePress (v2 + v1 reface)#2395
Merged
Conversation
|
@modelcontextprotocol/client
@modelcontextprotocol/codemod
@modelcontextprotocol/core
@modelcontextprotocol/server
@modelcontextprotocol/server-legacy
@modelcontextprotocol/express
@modelcontextprotocol/fastify
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
…out-of-tree links
VitePress renders the guide markdown directly, so typedoc-only {@linkcode}
tags now render as plain backticked code. Relative links that point outside
docs/ (examples, codemod sources) become absolute GitHub URLs since they
cannot resolve on the rendered site. The codemod package README gets the
same treatment, which also fixes its links on npm.
typedoc now emits one markdown page per module into docs/api/ (plus a typedoc-vitepress-theme sidebar JSON) instead of a standalone HTML site. HTML-theme options (projectDocuments, customJs, navigationLinks, hostedBaseUrl, headings) are dropped; the root README is excluded since the site has its own landing page. New scripts: docs:api (typedoc), docs:dev, docs:build (typedoc + vitepress, the new docs:check gate). check:all now also runs sync:snippets --check, which skips the generated docs/api tree.
Replaces the typedoc HTML site shell: guide pages get a proper sidebar, local search, and a home layout landing page reusing the README's own descriptions. The API Reference is a collapsed sidebar group imported from the generated typedoc-sidebar.json (with a clear warning when docs:api has not run yet). The theme extends the VitePress default with a monochrome palette modeled on the Python SDK docs and a version banner injected via the layout-top slot. Site-root-relative /specification/ links from spec-generated JSDoc are rewritten to modelcontextprotocol.io at render time.
…eline scripts/build-docs-site.sh replaces generate-multidoc.sh: it builds the v2 VitePress site from the current checkout into /v2/ and the v1 site at the root from an origin/v1.x worktree. The v1 content (docs/*.md + README.md as the landing page) is copied into the gitignored docs-v1/content/ at build time with the same mechanical link transforms applied to the build copy only — the v1.x branch itself stays untouched. docs-v1/ holds the VitePress shell for the v1 site, sharing the v2 theme CSS. The deploy workflow and README now invoke the new script.
Reverts the blanket link-externalization on this README: the four ./src/*.ts links stay relative (typedoc rewrites them to the matching API pages, and they work on GitHub/npm). Only the two ../../docs/migration/ links change, to the docs site URL, which stops typedoc-plugin-markdown copying the migration docs into api/_media/ with broken relative links of their own.
af57115 to
fde2a5d
Compare
This was referenced Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the typedoc HTML site with a VitePress-based documentation site. The hand-written guides lead the navigation, and the generated API reference becomes a single collapsed sidebar section instead of the whole site. The v1 docs at the domain root get the same shell with their content unchanged.
Motivation and Context
The deployed docs are a typedoc dump: a page per symbol dominates the site and the actual guides are buried under a "Documents" entry. This makes the guides the site, keeps the full API reference one click away (rendered as markdown, one page per package), and gives the v1 and v2 docs a consistent look and navigation.
No guide content is rewritten in this PR — existing pages are carried over as-is, with two mechanical transforms:
{@linkcode …}tags become plain code spans (VitePress does not resolve typedoc link syntax), and relative links that point outsidedocs/become GitHub URLs.How Has This Been Tested?
pnpm docs:build— typedoc (warnings as errors) + VitePress build with dead-link checking: 0 warnings, 0 dead links.bash scripts/build-docs-site.sh— the full two-site deploy artifact (v2 at/v2/, v1 at/, with the v1 leg built fromorigin/v1.x) builds end to end from a clean tree.git diffoverdocs/audited to confirm only the mechanical transforms;pnpm sync:snippets --check,pnpm -r typecheckboth green.Breaking Changes
None at runtime; this only touches docs tooling and CI for docs.
pnpm docs:checknow builds the site (typedoc warnings + dead links) instead of running typedoc alone.scripts/generate-multidoc.shis replaced byscripts/build-docs-site.sh.v1.xbranch's copy ofdeploy-docs.ymlshould be updated (or its push trigger removed) — as it stands, a push tov1.xwould redeploy the old typedoc layout over the site.Types of changes
Checklist
Additional context
README.mdat build time (docs:index), so the README stays the single source of truth — the same model the v1 site uses, and the same landing the previous typedoc site had.typedoc-plugin-markdown+typedoc-vitepress-theme,outputFileStrategy: modules— one page per package, not per symbol) intodocs/api/, which is gitignored; nothing generated is committed.sync:snippets --checkis now part ofcheck:all, so snippet drift fails the PR gate rather than only the local pre-push hook.pnpm installstep (the old script installed inside a throwaway worktree; the new one builds the current checkout).v1.xmarkdown (the old typedoc shell supplied page titles), so the v1 build step prepends one per page; thev1.xbranch itself is untouched.